<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
<%@ taglib prefix="map" uri="/map" %>  
<%
	String basepath = request.getContextPath();
%>

<script type="text/javascript">

$(function(){
	
	var config = ${map:json(config)};
	
	loader.load(basepath+"/"+config["module.namespace"]+"/"+"role.js",function(){
		
		var module = new role();
		
		app.module=module;
		
		app.module.init(config);

	});
	
});

</script>

<!-- 查询区 -->
 <form class="core-form c3" id="listForm" type="query">
 </form>

<div class="blank5"></div>


<!-- 列表按钮区 -->
<jsp:include page="/commons/commons_module_rights_list.jsp"></jsp:include>

<div style="width:685px;" class="fl">
<div class="blank5"></div>
	<!-- 列表区 -->
	<table class="core-grid" id="list" title="${module.MODULE_NAME}列表" url="<%=basepath %>/${config['module.namespace']}/list" idField="${config['module.idCol']}" pagination="true" style="height:405px;" clickList="app.module.clickList" listLoaded="app.module.listLoaded" listParams="app.module.listParams" >
		<thead>
			<tr>
				<th field="ROLE_ID" checkbox="true"></th>
				<th field="ROLE_NAME" width="200" >角色名称</th>
				<th field="ROLE_REMARK" width="400" align="center" >角色备注</th>
				<th field="SJZT_MC" width="100" align="center" >数据状态</th>
			</tr>
		</thead>
	</table>
</div>
<div class="fr" style="width:310px;">
<div class="blank5"></div>
<!-- 表单区 -->
<div id="tabs" class="core-tabs" selectTab="app.module.selectTab">

	<div title="${module.MODULE_NAME}" style="padding:10px;">
		<form id="itemForm" class="core-form" col="2" type="item">
		 	<input type="hidden" name="${config['module.idCol']}" /> 
		 	<input type="hidden" name="SJZT" />
			<table>
				<tr>
				  <td>角色名称：</td>
				  <td><input name="ROLE_NAME" class="disabled check"  req="false" readonly></td>
				</tr>
				<tr>
				  <td >角色备注：</td>
				  <td><textarea name="ROLE_REMARK"  class="disabled" readonly rows="5" ></textarea></td>
				</tr>
				<jsp:include page="/commons/commons_module_rights_item.jsp"></jsp:include>
			</table>
			<jsp:include page="/commons/commons_module_item_info_one.jsp"></jsp:include>
		</form>
	</div>
	<div title="系统权限" style="padding:10px;">
		<ul class="core-tree" id="listModules" url="<%=basepath %>/${config['module.namespace']}/listModules"  checkbox="true" nameCol="MODULE_NAME" idCol="MODULE_NO" pidCol="MODULE_NO_PRE" listParams="app.module.listDatailParams"></ul>
		<c:if test="${map:has(module_rights,'B-G-E') }">
			<div class="blank5"></div>
			<a class="core-button" style="float:right" icon="icon-edit" id="reModuleRight" style="display: none;" onclick="app.module.reModuleRight($(this))">授权</a>
		</c:if>
	</div>
	<c:if test="${user.USER_RIGHT==9 }">
		<div title="分配权限" style="padding:10px;">
			<ul class="core-tree" id="listFpModules" url="<%=basepath %>/${config['module.namespace']}/listFpModules"  checkbox="true" nameCol="MODULE_NAME" idCol="MODULE_NO" pidCol="MODULE_NO_PRE" listParams="app.module.listDatailParams"></ul>
			<c:if test="${map:has(module_rights,'B-G-E') }">
				<div class="blank5"></div>
				<a class="core-button" style="float:right" icon="icon-edit" id="reFpModuleRight" style="display: none;" onclick="app.module.reFpModuleRight($(this))">授权</a>
			</c:if>
		</div>
	</c:if>
</div>
</div>
<div class="clear"></div>